<template>
  <Row>
    <Col span="2">
      <span>待处理 </span>{{waiting}}<span> 份</span>
    </Col>
    <Col span="2">
      <span>处理中 </span>{{processing}}<span> 份</span>
    </Col>
    <Col span="2">
      <span>已处理 </span>{{processed}}<span> 份</span>
    </Col>
  </Row>
</template>
<script>
export default {
  data () {
    return {
      $ajax: null,
      waiting: 0,
      processing: 0,
      processed: 0
    }
  },
  props: {
    taskNodes: Array
  },
  methods: {
    // 查询取件数量
    countTask () {
      // var params = {strNodes: this.taskNodes.join(',')}
      var params = this.taskNodes.join(',')
      this.$ajax.post(this.$appContext.marvels_core_approve + 'approve/process/service/countTask', params).then(re => {
        if (re.data.code === 'success') {
          // this.decision = re.data.data.decision
          this.waiting = re.data.data.waiting
          this.processing = re.data.data.processing
          // this.patch = re.data.data.patch
          this.processed = re.data.data.processed
        } else {
          this.$Message.warning({
            title: '提示',
            content: re.data.message,
            onOk () {}
          })
        }
      }).catch(er => {

      })
    }
  },
  created () {
    this.$ajax = this.$util.ajax()
    this.countTask()
  }
}
</script>
